﻿using System;
using System.Configuration;
using System.Data;

using DotNetNuke.Services.Installer.Packages;

namespace CharityGamesOnline.Modules.Game
{
    public class GamePackageInfo : PackageInfo
    {
        int _gameID;
        string _gameName;

        public int GameID
        {
            get { return _gameID; }
            set { _gameID = value; }
        }

        public string GameName
        {
            get { return _gameName; }
            set { _gameName = value; }
        }
    }

    public class GameInfo
    {
        #region "Private Members"
        
        int _gameID;
        int _portalID;
        string _packageName;
        string _name;
        string _description;
        string _imageURL;
        string _imageType;
        int _imageWidth;
        int _imageHeight;
        int _gameTabID;
        int _status;
        int _category;
        bool _imageDisplay;
        int _createdByID;
        private string _createByUserName;        
        DateTime _createdDate;
        int _lastUpdatedID;
        private string _lastUpdateUserName;
        DateTime _lastUpdateDate;

        #endregion

        #region "Constructors"
        public GameInfo()
        {
        }
        #endregion

        #region "Public Properties"
        public int GameID
        {
            get { return _gameID; }
            set { _gameID = value; }
        }

        public int PortalID
        {
            get { return _portalID; }
            set { _portalID = value; }
        }

        public string PackageName
        {
            get { return _packageName; }
            set { _packageName = value; }
        }

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }

        public string ImageURL
        {
            get { return _imageURL; }
            set { _imageURL = value; }
        }

        public string ImageType
        {
            get { return _imageType; }
            set { _imageType = value; }
        }

        public int ImageWidth
        {
            get { return _imageWidth; }
            set { _imageWidth = value; }
        }

        public int ImageHeight
        {
            get { return _imageHeight; }
            set { _imageHeight = value; }
        }

        public int GameTabID
        {
            get { return _gameTabID; }
            set { _gameTabID = value; }
        }
        
        public int Status
        {
            get { return _status; }
            set { _status = value; }
        }

        public int Category
        {
            get { return _category; }
            set { _category = value; }
        }

        public bool ImageDisplay
        {
            get { return _imageDisplay; }
            set { _imageDisplay = value; }
        }

        public int CreatedByID
        {
            get { return _createdByID; }
            set { _createdByID = value; }
        }

        public string CreateByUserName
        {
            get { return _createByUserName; }
            set { _createByUserName = value; }
        }

        public DateTime CreatedDate
        {
            get { return _createdDate; }
            set { _createdDate = value; }
        }

        public int LastUpdatedID
        {
            get { return _lastUpdatedID; }
            set { _lastUpdatedID = value; }
        }        

        public string LastUpdateUserName
        {
            get { return _lastUpdateUserName; }
            set { _lastUpdateUserName = value; }
        }

        public DateTime LastUpdateDate
        {
            get { return _lastUpdateDate; }
            set { _lastUpdateDate = value; }
        }
        #endregion
    }

    public class GameEnrollmentInfo
    {
        #region Public Members
        public enum STATUS { ENROLLED = 1, PAID = 2, PLAYING = 3, COMPLETED = 4 };
        public enum ERRORCODE { NOTAUTHORIZED = -1, NOTPAID = -2, NOTACTIVE = -3, NOTPLAYED = -4 };
        #endregion

        #region "Private Members"
        int _rank;
        int _totalRowCount;
        int _enrollmentID;
        int _portalID;
        int _eventID;
        string _eventName;
        int _gameID;
        string _gameName;
        int _userID;
        string _userName;
        int _enrollStatusID;
        string _enrollStatus;
        decimal _enrollFee;
        DateTime _startTime;
        DateTime _endTime;
        int _connectCount;
        decimal _score;
        DateTime _createdDate;
        DateTime _lastUpdateDate;
        #endregion

        #region "Constructors"
        public GameEnrollmentInfo()
        {
        }

        #endregion

        #region "Public Properties"

        public int Rank
        {
            get { return _rank; }
            set { _rank = value; }
        }

        public int TotalRowCount
        {
            get { return _totalRowCount; }
            set { _totalRowCount = value; }
        }

        public int EnrollmentID
        {
            get { return _enrollmentID; }
            set { _enrollmentID = value; }
        }

        public int PortalID
        {
            get { return _portalID; }
            set { _portalID = value; }
        }

        public int EventID
        {
            get { return _eventID; }
            set { _eventID = value; }
        }

        public string EventName
        {
            get { return _eventName; }
            set { _eventName = value; }
        }

        public int GameID
        {
            get { return _gameID; }
            set { _gameID = value; }
        }

        public string GameName
        {
            get { return _gameName; }
            set { _gameName = value; }
        }        

        public int UserID
        {
            get { return _userID; }
            set { _userID = value; }
        }

        public string UserName
        {
            get { return _userName; }
            set { _userName = value; }
        }

        public int EnrollStatusID
        {
            get { return _enrollStatusID; }
            set { _enrollStatusID = value; }
        }

        public string EnrollStatus
        {
            get { return _enrollStatus; }
            set { _enrollStatus = value; }
        }

        public decimal EnrollFee
        {
            get { return _enrollFee; }
            set { _enrollFee = value; }
        }

        public DateTime StartTime
        {
            get { return _startTime; }
            set { _startTime = value; }
        }

        public DateTime EndTime
        {
            get { return _endTime; }
            set { _endTime = value; }
        }

        public int ConnectCount
        {
            get { return _connectCount; }
            set { _connectCount = value; }
        }

        public decimal Score
        {
            get { return _score; }
            set { _score = value; }
        }

        public DateTime CreatedDate
        {
            get { return _createdDate; }
            set { _createdDate = value; }
        }

        public DateTime LastUpdateDate
        {
            get { return _lastUpdateDate; }
            set { _lastUpdateDate = value; }
        }
        #endregion
    }
}
